package org.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 用户部门关联表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_dept")
public class UserDept {
    /**
     * 主键ID
     */
    @TableId(value = "ud_id", type = IdType.INPUT)
    private Integer udId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 部门ID
     */
    @TableField(value = "dept_id")
    private Integer deptId;

    @TableField(exist = false)
    private User user;//用户表

    @TableField(exist = false)
    private Department department;//部门表
}